<?php

namespace App\Http\Requests;

use Illuminate\Contracts\Validation\Validator;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\ValidationException;

class BaseRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }


    public function messages()
    {
        return [
            'required' => ':attribute不能为空',
            'unique' => ':attribute已存在',
            'regex' => ':attribute格式错误',
            'string' => ':attribute格式错误',
            'in' => ':attribute格式错误',
            'min' => ':attribute格式错误',
        ];
    }
}
